package prototipo.server.logic;

import prototipo.server.db.exception.ExceptionDB;
import prototipo.server.logic.exception.ExceptionLogic;
import prototipo.server.logic.item.ProductIF;
import prototipo.server.logic.item.RawIF;
import prototipo.server.logic.person.ClientIF;
import prototipo.server.logic.person.Supplier;
import prototipo.server.logic.person.SupplierIF;
import prototipo.server.logic.transaction.InputIF;
import prototipo.server.logic.transaction.OutputIF;
import prototipo.server.logic.user.UserIF;
import prototipo.server.logic.util.PasswordIF;

public interface LogicIF {
	int registerUser(int sessionID, UserIF newUser) throws ExceptionLogic,
			ExceptionDB;

	boolean editUser(int sessionID, int userID, UserIF editedUser)
			throws ExceptionLogic, ExceptionDB;

	boolean removeUser(int sessionID, int userID) throws ExceptionLogic,
			ExceptionDB;

	int login(String login, PasswordIF password) throws ExceptionLogic,
			ExceptionDB;

	boolean logout(int sessionID) throws ExceptionLogic;

	long registerSupplier(int sessionID, SupplierIF newSupplier)
			throws ExceptionLogic, ExceptionDB;

	boolean editSupplier(int sessionID, long supplierID,
			SupplierIF editedSupplier) throws ExceptionLogic, ExceptionDB;

	boolean removeSupplier(int sessionID, long supplierID)
			throws ExceptionLogic, ExceptionDB;

	long registerClient(int sessionID, ClientIF newClient)
			throws ExceptionLogic, ExceptionDB;

	boolean editClient(int sessionID, long clientID, ClientIF editedClient)
			throws ExceptionLogic, ExceptionDB;

	boolean removeClient(int sessionID, long clientID) throws ExceptionLogic,
			ExceptionDB;

	long registerRaw(int sessionID, RawIF newRaw) throws ExceptionLogic,
			ExceptionDB;

	int increaseProduct(int sessionID, int productID, int quant)
			throws ExceptionLogic, ExceptionDB;

	int decrementProduct(int sessionID, int productID, int quant)
			throws ExceptionLogic, ExceptionDB;

	boolean editProduct(int sessionID, int productID, ProductIF editedProduct)
			throws ExceptionLogic, ExceptionDB;

	boolean removeProduct(int sessionID, int productID) throws ExceptionLogic,
			ExceptionDB;

	long registerProduct(int sessionID, ProductIF newProduct)
			throws ExceptionLogic, ExceptionDB;

	boolean removeRaw(int sessionID, int rawID) throws ExceptionLogic,
			ExceptionDB;

	boolean editRaw(int sessionID, int rawID, RawIF editedRaw)
			throws ExceptionLogic, ExceptionDB;

	int decrementRaw(int sessionID, int rawID, int quant)
			throws ExceptionLogic, ExceptionDB;

	int increaseRaw(int sessionID, int rawID, int quant) throws ExceptionLogic,
			ExceptionDB;

	SupplierIF getSupplierById(int sessionID, int supplierID)
			throws ExceptionLogic, ExceptionDB;

	long registerInput(int sessionID, InputIF input) throws ExceptionLogic,
			ExceptionDB;

	boolean editInput(int sessionID, long inputID, InputIF editedInput)
			throws ExceptionLogic, ExceptionDB;

	boolean removeInput(int sessionID, long inputID) throws ExceptionLogic,
			ExceptionDB;

	long registerOutput(int sessionID, OutputIF output) throws ExceptionLogic,
			ExceptionDB;

	boolean editOutput(int sessionID, long outputID, OutputIF editedOutput)
			throws ExceptionLogic, ExceptionDB;

	boolean removeOutput(int sessionID, long outputID) throws ExceptionLogic,
			ExceptionDB;

	boolean addPermission(int sessionID, int userID, String operation) throws ExceptionLogic, ExceptionDB;
	
	boolean removePermission(int sessionID, int userID, String operation) throws ExceptionLogic, ExceptionDB;

}
